<!--            begin nav kpopzone-->
<?
$JO["JO_searchid"]=JO(array("EN"=>"Search key","VI"=>"tim kiem"));
?>

<script>

</script>
	
<div style="margin-left: 0px;" class="bar_240i" >

<div class="JO_h1i">
    Recommendation List
</div>
  <div style=" margin:4px 8px;" >
  <input type="text" style="width:216px;border:none;background:#333;color:#888888;height:18px" name="txtsearchartist" id="txtsearchartist" value="<?=$JO["JO_searchid"]?>"/></div>
 
  <div class="content240i">
    <ul class="navi" style="">
      <?php 
	  	$sea=isset($_GET['sea'])?$_GET['sea']:"";
		$result_count=JO_13_artist_get_searchlist($sea);
		$total=$result_count->num_rows;
		$page=1;
		$limit=10;
		$i=1;
		if(($total%$limit)!=0) {$numpages=(int)($total/$limit)+1;}
		else                {$numpages=$total/$limit;}
		if(isset ($_REQUEST["page"])){$page=$_REQUEST["page"];}
		$vt=(($page-1)*$limit)+1;
		$result=JO_13_artist_get_search_pagelist($sea,$vt,$limit);
		$showselect=TRUE;
		if($result->num_rows)
		while($row=$result->fetch_array())
		{
		 ?>
        <li>
        <div <?php 
		if(isset($_GET['SO_chude']) && $_GET['SO_chude']==$row["key"])
		echo "style='width:208px;float:left;display:block;text-decoration:underline'";
       	else
		echo "style='width:208px;float:left;display:block'";
        ?>
        >
				<a class="" 
					href="?JO_unit=013_artist&SO_chude=<?=$row['key']?>"
					
				><?=$row['name']?></a>
             </div>
            
            
              
             
         </li>
                <?php  }?>
    
       <div style="width:164px;float:left;text-align:center;">
    		 <?

               		 if($numpages>1){
                    if($page>2){
                    ?>
              <a class="JO_pagesiii" href="?JO_unit=013_Artist&page=1" onclick="sendurl('1');">◀</a>
              <?
                    }
                    if($page>1){
                    ?>
              <a class="JO_pagesiii" href="?JO_unit=013_Artist&page=<?=($page-1)?>" onclick="sendurl('<?=($page-1)?>');">◁</a>
              <?
                    }
                    if($page-4>1) echo "...";
                    for($i=$page-4;$i<=($page-1);$i++){
                        if($i>0){
                        ?>
              <a class="JO_pagesiii" href="?JO_unit=013_Artist&page=<?=$i?>"  >
              <?=$i?>
              </a>
              <?
                        }
                    }
                    echo  "<b class='JO_pagesiii pageactive'>".$page."</b>";
                    for($i=$page+1;$i<=($page+4);$i++){
                        if($i<=$numpages){
                        ?>
              <a class="JO_pagesiii" href="?JO_unit=013_Artist&page=<?=$i?>"  >
              <?=$i?>
              </a>
              <?
                        }
                    }
                    if($page+4<$numpages) echo "...";
                    if($page<$numpages){
                    ?>
              <a class="JO_pagesiii" href="?JO_unit=013_Artist&page=<?=($page+1) ?>" onclick="sendurl('<?=($page+1) ?>');">▷</a>
              <?
                    }
                    if($page<($numpages-1)){
                    ?>
              <a class="JO_pagesiii" href="?JO_unit=013_Artist&page=<?=$numpages ?>" onclick="sendurl('<?=$numpages ?>');">▶</a>
              <?
                    }

                }
                 ?>
                 </div>
    
    </ul>
  </div>
 
 </div>
<!--            end nav kpopzone-->
<script type="text/javascript">
    var musics=new Array();
    var n=0;
	
function JO_load_iframe(id){
	if(id=="")
	var url="JO_012_01_recommendation.php";
	else
	var url="JO_012_01_recommendation.php?SO_chude="+id;
	var obj="JO_popupsub";
	showobj(url,obj)
	}
</script>



 <script>

  $('#txtsearchartist').keypress(
  	function(event){
		
        if (event.which == 13)
        {

            var key=$("#txtsearchartist").val();
            if(key=="<?=$JO["JO_searchid"]?>" || key==""){

                location=("?JO_unit=013_Artist");
            }else{

                location=("?JO_unit=013_Artist&sea="+key);
            }

        }
	}
  	);
	

  </script>